package com.leucoderma.medicine.service.impl;

import com.leucoderma.medicine.mapper.PatientMapper;
import com.leucoderma.medicine.pojo.Patient;
import com.leucoderma.medicine.service.PatientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class PatientServiceImpl implements PatientService {
    @Autowired
    PatientMapper patientMapper;
    @Override
    public List<Patient> listPatients() {
        return patientMapper.listPatients();
    }

    @Override
    public Patient getPatientById(Long id) {
        return patientMapper.getPatientById(id);
    }

    @Override
    public Patient getPatientByNameAndRecordNo(String name, String recordNo) {
        return patientMapper.getPatientByNameAndRecordNo(name,recordNo);
    }
}
